<?php TPL::output('admin/global/header.tpl.htm'); ?>

<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<!-- main -->
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3><?php echo $this->crumb['last']['name']; ?></h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/user_manage/user_save_ajax/" method="post">
					<input name="uid" type="hidden" value="<?php echo $this->user['uid']; ?>">
					<fieldset>
					<p>
						<label>用户名：</label>
						<input name="user_name" class="text-input small-input" type="text" value="<?php echo $this->user['user_name']; ?>"/>
					</p>
					<p>
						<label>密码：</label>
						<input name="password" class="text-input small-input" type="text" value=""/> &nbsp; (不更改请勿填写)</p>
					<p>
						<label>邮箱：</label>
						<input name="email" class="text-input small-input" type="text" value="<?php echo $this->user['email']; ?>"/>
					</p>
					<p>
						<label>一句话介绍：</label>
						<input name="signature" class="text-input small-input" type="text" value="<?php echo $this->user['signature']; ?>"/>
					</p>
					<p>
						<label>积分：<span style="font-weight:normal;"><?php echo $this->user['integral']; ?></span>&nbsp;&nbsp;<a href="admin/user_manage/integral/uid-<?php echo $this->user['uid']; ?>">[增加积分]</a></label>
					</p>
					<p>
						<label>邮箱激活状态：</label>
						<input type="radio" name="valid_email" value="1" <?php if($this->user['valid_email']=='1'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="valid_email" value="0" <?php if($this->user['valid_email']=='0'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<p>
						<label><input type="checkbox" name="verified" value="1" <?php if($this->user['verified']=='1'){ ?> checked="true"<?php } ?>/>认证用户
						</label>
					</p>
					<p>
						<label>头像：</label>
						<img src="<?php echo get_avatar_url($this->user['uid'], 'max'); ?>"/><br/>
						<input name="delete_avatar" type="checkbox" value="1">
						删除头像 </p>
					<?php if($this->user_info['group_id'] == '1'){ ?>
					<p>
						<label>用户组：</label>
						<select class="small-input" name="group_id">
							<?php foreach($this->system_group as $skey => $val){ ?>
							<option value="<?php echo $val['group_id']; ?>"<?php if($this->user['group_id'] == $val['group_id']){ ?> selected=true<?php } ?>><?php echo $val['group_name']; ?></option>
							<?php } ?>
						</select>
					</p>
					<?php } ?>
					<p>
						<label>锁定当前用户：</label>
						<input type="radio" name="forbidden" value="1" <?php if($this->user['forbidden']=='1'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="forbidden" value="0" <?php if($this->user['forbidden']=='0'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<p>
						<label>注册时间：</label>
						<input name="reg_time" class="text-input small-input" type="text" value="<?php if($this->user['reg_time']){ echo date("Y-m-d H:i:s", $this->user['reg_time']); } ?>"/>
					</p>
					<p>
						<label>注册 IP：</label>
						<input name="reg_ip" class="text-input small-input" type="text" value="<?php if($this->user['reg_time']){ echo long2ip($this->user['reg_ip']); } ?>"/>
					</p>
					<p>
						<label>上次登录时间：</label>
						<input name="last_login" class="text-input small-input" type="text" value="<?php if($this->user['last_login']){ echo date("Y-m-d H:i:s", $this->user['last_login']); } ?>"/>
					</p>
					<p>
						<label>上次登录 IP：</label>
						<input name="last_ip" class="text-input small-input" type="text" value="<?php if($this->user['last_ip']){ echo long2ip($this->user['last_ip']); } ?>"/>
					</p>
					<p>
						<label>性别：</label>
						<input type="radio" name="sex" value="1" <?php if($this->user['sex']=='1'){ ?> checked="true"<?php } ?>/>
						男
						<input type="radio" name="sex" value="2" <?php if($this->user['sex']=='2'){ ?> checked="true"<?php } ?>/>
						女
						<input type="radio" name="sex" value="3" <?php if($this->user['sex']=='3'){ ?> checked="true"<?php } ?>/>
						保密 </p>
					<p>
						<label>出生日期：</label>
						<input name="birthday" class="text-input small-input" type="text" value="<?php if($this->user['birthday']){ echo date("Y-m-d H:i:s", $this->user['birthday']); } ?>"/>
					</p>
					<p>
						<label>可用邀请名额：</label>
						<input name="invitation_available" class="text-input small-input" type="text" value="<?php echo $this->user['invitation_available']; ?>"/>
					</p>
					<p>
						<input class="button" type="button" onClick="ajax_post($('#_save_form'), _form_process);" value="  保  存  " />
					</p>
					</fieldset>
					<div class="clear"></div>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>

<!-- footer -->
<?php TPL::output('admin/global/footer.tpl.htm'); ?>
<!-- footer -->

</div>
<!-- main -->

</div>

</body>
</html>